﻿using System.Drawing;
using TSites.Common.Enums;
using TSites.Core.Domain.UserMangerment;

namespace TSites.UserMgmt
{
	public interface IMembership
	{
		User GetByUserId(string userId);
		// Methods
        RET_CODE RegisterUser(User entity);
		RET_CODE ValidateUser(string userId, string password, out User currentUser);
		RET_CODE Logon(string userId, string password);
		RET_CODE UpdateUser(User entity);
		RET_CODE ChangePassword(string userId, string currentPassword, string newPassword);
		RET_CODE ForgotPassword(string email);
		RET_CODE ActiveByKeyVerify(string keyVerify);
		void Logout();

		RET_CODE CheckExists(string userId, string email);
		RET_CODE UserExists(string userId);
		RET_CODE EmailExists(string email);
		RET_CODE EmailExists(string email, string userId);

		Bitmap GenerateCaptcha(out string captcha);
	}
}
